It is often desirable to scan data before allowing it into a computer or a computer network. Data can contain undesirable content, such as malicious code (e.g. a computer virus), or content which is not permitted within a specific computing environment (e.g. entertainment material within a business environment). Scanning an inbound stream of data prior to allowing it into a computing environment can detect undesirable content, and either block the entry of the data, or modify the data so as to remove the undesirable content. Similarly, scanning an outbound stream of data prior to allowing it to leave a computing environment can detect and process malicious code originating from that organization's computer network.
It is often desirable for a plurality of scanners to scan an incoming or outgoing data stream. Individual scanners can scan the data stream for specific forms of undesirable content. Some of these scanners are typically read-only scanners, which can scan incoming or outgoing data, but cannot modify it. An example would be a scanner that reads a data stream looking for key words in context, in order to determine whether incoming data contains banned content, such as information concerning sports or entertainment. Such a read-only scanner can block detected banned content from entering or leaving a computing environment.
Some additional scanners are typically modify scanners, meaning that they can, under select circumstances, modify incoming or outgoing data. An example of a modify scanner would be an anti-virus scanner, which can scan incoming or outgoing data in order to look for known computer viruses. Such a scanner could modify the data to remove a detected computer virus, provided that the detected virus is one that the scanner is programmed to remove.
It is often desirable to have the same data stream scanned by multiple modify scanners and by multiple read-only scanners, in order to detect and process multiple varieties of undesirable content. However, because each modify scanner can modify the data, it is necessary that each modify scanner scan the data serially rather than in parallel. Maintenance of data integrity requires that only one scanner write to the data at a time.
Additionally, it can be desirable for a plurality of modify scanners to scan the data in a specific order, so as to scan the data for one type of undesirable content only after it has been scanned and potentially corrected for another.
A problem with the need for serial scanning is latency. Typically, a block of data from an incoming or outgoing stream is cached, and then the entire block is serially scanned by each of a plurality of scanners. Only after this is complete is the block passed along to its destination. This can drastically decrease the speed of data transmission. It is beneficial to transmit data to a destination as quickly as possible. For example, where data is being loaded into a browser from a server, it is clearly undesirable to delay the data transmission. Thus, it is preferable to be able to scan the data and pass it along to the browser as quickly as possible.
It is further desirable to keep as little data cached as necessary, not only to increase the rate of data throughput, but also to minimize the amount of storage media required for the cache.